<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Firefox兼容性测试</title>
    <style>
        /* Material Icons Font Import - 必须在顶部 */
        @import url('https://fonts.googleapis.com/icon?family=Material+Icons');
        @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

        body {
            font-family: 'Roboto', sans-serif;
            margin: 0;
            padding: 20px;
            background: #f5f5f5;
        }

        .test-container {
            max-width: 600px;
            margin: 0 auto;
            background: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .test-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 24px;
            border: none;
            border-radius: 4px;
            font-size: 0.875rem;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            cursor: pointer;
            transition: all 0.3s;
            min-height: 36px;
            background: #6200ee;
            color: white;
            /* Firefox特定修复 */
            -moz-appearance: none;
            appearance: none;
            position: relative;
            z-index: 1;
            user-select: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
        }

        .test-button:hover {
            background: #3700b3;
            box-shadow: 0 3px 6px rgba(0,0,0,0.16);
        }

        .test-button:disabled {
            background: #e0e0e0;
            color: #757575;
            cursor: not-allowed;
            opacity: 0.6;
        }

        .material-icon {
            font-family: 'Material Icons';
            font-weight: normal;
            font-style: normal;
            font-size: 24px;
            line-height: 1;
            letter-spacing: normal;
            text-transform: none;
            display: inline-block;
            white-space: nowrap;
            word-wrap: normal;
            direction: ltr;
            vertical-align: middle;
            /* Firefox特定修复 */
            -moz-osx-font-smoothing: grayscale;
            -webkit-font-smoothing: antialiased;
            text-rendering: optimizeLegibility;
        }

        .test-input {
            width: 100%;
            padding: 12px 16px;
            border: 1px solid #e0e0e0;
            border-radius: 4px;
            font-size: 1rem;
            transition: border-color 0.3s, box-shadow 0.3s;
            background: #fafafa;
            margin-bottom: 10px;
            /* Firefox特定修复 */
            -moz-appearance: none;
            appearance: none;
        }

        .test-input:focus {
            outline: none;
            border-color: #6200ee;
            box-shadow: 0 0 0 2px rgba(98, 0, 238, 0.2);
            background: white;
        }

        .result {
            margin-top: 20px;
            padding: 10px;
            background: #e8f5e8;
            border-radius: 4px;
            border-left: 4px solid #4caf50;
        }

        .error {
            background: #ffebee;
            border-left-color: #f44336;
        }

        /* Firefox特定修复 */
        @-moz-document url-prefix() {
            .test-button {
                pointer-events: auto;
                background-clip: padding-box;
            }
            
            .test-input {
                background-clip: padding-box;
            }
        }
    </style>
</head>
<body>
    <div class="test-container">
        <h1>Firefox兼容性测试</h1>
        <p>测试Firefox中的按钮点击和输入框功能</p>
        
        <div>
            <input type="text" class="test-input" placeholder="测试输入框" id="testInput">
        </div>
        
        <div>
            <button class="test-button" onclick="testClick()">
                <span class="material-icon">check_circle</span>
                验证输入
            </button>
        </div>
        
        <div id="result" class="result" style="display: none;"></div>
        
        <div style="margin-top: 20px;">
            <h3>测试说明：</h3>
            <ul>
                <li>在输入框中输入任意文本</li>
                <li>点击"验证输入"按钮</li>
                <li>如果按钮可以正常点击并显示结果，说明Firefox兼容性正常</li>
                <li>如果按钮无法点击，说明存在兼容性问题</li>
            </ul>
        </div>
    </div>

    <script>
        function testClick() {
            const input = document.getElementById('testInput');
            const result = document.getElementById('result');
            
            if (input.value.trim()) {
                result.innerHTML = `
                    <strong>✅ 测试成功！</strong><br>
                    输入内容: "${input.value}"<br>
                    按钮点击功能正常，Firefox兼容性良好。
                `;
                result.className = 'result';
            } else {
                result.innerHTML = `
                    <strong>⚠️ 请输入内容</strong><br>
                    请在输入框中输入一些文本后再点击按钮。
                `;
                result.className = 'result error';
            }
            
            result.style.display = 'block';
        }

        // 页面加载完成后的测试
        window.addEventListener('load', function() {
            console.log('Firefox兼容性测试页面已加载');
            console.log('浏览器信息:', navigator.userAgent);
            
            // 检测是否为Firefox
            const isFirefox = navigator.userAgent.toLowerCase().includes('firefox');
            if (isFirefox) {
                console.log('检测到Firefox浏览器');
            }
        });
    </script>
</body>
</html> 